from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import create_app, db

# 创建app对象
app = create_app("development")
# 6.创建数据库管理对象
# 7.将app交给管理对象管理
manager = Manager(app)
# 8.数据库迁移初始化
Migrate(app, db)
# 9.添加迁移命令
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()